package com.app.service.impl;

import com.app.dao.mysql.UploadParameterMapper;
import com.app.domain.UploadParameter;
import com.app.service.UploadParameterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UploadParameterServiceImpl implements UploadParameterService {
    @Autowired
    UploadParameterMapper uploadParameterMapper;

    @Override
    public String update(UploadParameter uploadParameter) {
        String res;
        try {
            uploadParameterMapper.update(uploadParameter);
            res = "保存成功";
        } catch (Exception e) {
            e.printStackTrace();
            res = "保存失败";
        }
        return res;
    }

    @Override
    public UploadParameter findOne(String id) {
        return uploadParameterMapper.findOne(id);
    }
}
